﻿#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include "base64worker.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
private slots:
    void onSelectFileClicked();
    void onSaveAsClicked();
    void onStartClicked();
    void updateProgress(qint64 processedSize);
    void onWorkerFinished();
    void onErrorOccurred(const QString &errorMessage);
private:
    Ui::Widget *ui;
    Base64Worker *base64Worker;
    QString m_inputFileName;
    QString m_outputFileName;
    qint64 m_totalFileSize;
    QFile *m_outputFile;
};
#endif // WIDGET_H
